package com.hbnu.pojo;

import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;

public class MyThread {
    private Condition condition;
    private Thread thread;
    private ReentrantLock lock;

    @Override
    public String toString() {
        return "MyThread{" +
                "condition=" + condition +
                ", thread=" + thread +
                ", lock=" + lock +
                '}';
    }

    public ReentrantLock getLock() {
        return lock;
    }

    public void setLock(ReentrantLock lock) {
        this.lock = lock;
    }

    public MyThread(Condition condition, Thread thread, ReentrantLock lock) {
        this.condition = condition;
        this.thread = thread;
        this.lock = lock;
    }

    public Condition getCondition() {
        return condition;
    }

    public void setCondition(Condition condition) {
        this.condition = condition;
    }

    public Thread getThread() {
        return thread;
    }

    public void setThread(Thread thread) {
        this.thread = thread;
    }
}
